package org.freedom.imarket.repository;

import java.util.List;
import java.util.Set;

import org.freedom.imarket.entities.ListaSpesa;
import org.freedom.imarket.entities.ListaSpesaId;
import org.freedom.imarket.entities.User;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

public interface ListaSpesaRepository extends JpaRepository<ListaSpesa, ListaSpesaId> {
	
	@Query("select listaSpesa from ListaSpesa listaSpesa where listaSpesa.id.idUser=?1")
	List<ListaSpesa> findByUser(String userId);

}
